package com.huilian.tool.common.config;

import com.huilian.tool.douyin.web.service.DefaultDouYinMsgEventService;
import com.huilian.tool.douyin.web.service.impl.DefaultDouYinMsgEventServiceImpl;
import com.huilian.tool.weixin.service.WeiXinMsgEventService;
import com.huilian.tool.weixin.service.impl.DefaultWeiXnMsgEventServiceImpl;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @authou 少凡
 * @Date 2019-04-13 10:34
 */
@Configuration
public class BeanConfig {

    /**
     * 默认微信公众号事件处理服务
     * @return
     */
    @Bean
    @ConditionalOnMissingBean(WeiXinMsgEventService.class)
    public WeiXinMsgEventService weixinMessageService() {
        return new DefaultWeiXnMsgEventServiceImpl();
    }




    /**
     * 默认微信公众号事件处理服务
     * @return
     */
    @Bean
    @ConditionalOnMissingBean(DefaultDouYinMsgEventService.class)
    public DefaultDouYinMsgEventService defaultDouYinMsgEventService() {
        return new DefaultDouYinMsgEventServiceImpl();
    }


}
